1. Field of the Invention
The present invention relates to an information storage device that writes and reads information files to and from a recording medium according to instructions from a higher-level device.
2. Description of the Related Art
Information storage devices such as an MO (Magneto-optical disk) drive and HDD (Hard disk drive) are known that are used as auxiliary storage devices of higher-level devices (hosts) typified by personal computers. Such an information storage device is internally or externally connected to the host and reads and writes an information file to and from a recording medium in response to an instruction from the host. In the information storage device, components of an information file may often be stored in discontiguous areas on a recording medium.
FIG. 1 shows an example in which components of a single information file are stored in discontiguous areas on a recording medium.
The exemplary recording medium shown in FIG. 1 is an MO disk 1 on which information is recorded using magneto-optical recording technology. A large number of arched sectors are provided in spiral or concentric tracks on the MO disk 1. These tracks are divided into concentric zones. An information file is stored along such tracks one-dimensionally. In FIG. 1, components of the information file are stored discontiguously in a discontiguous first area 2a and a second area 2b. A state in which an information file is stored in this way is hereinafter simply referred to as “an information file is discontiguous.” The first and second areas 2a and 2b are contained in different zones (zone n and zone x) in the example shown.
An information file may become discontiguous when free recording areas are produced due to write or delete operations performed in the information file and large information file is written in the discontiguous free areas, or when the information file is overwritten with a larger information file produced by a user modifying the existing information file. In such a case, information files are recorded in such a manner that space between them is minimized in order to use efficiently the available space of the recording medium. As a result, a discontiguous information file is produced.
A discontiguous information file slows down the so-called throughput, which represents time required to perform a read or write operation.
FIG. 2 shows a time chart of an operation for writing an information file in discontiguous free areas.
First, at time T1, a host provides the address of a file system area in which the storage state of the file is recorded to the information storage device and also provides a command for reading data stored at that address in order to know the storage state of the file on the recording medium. The information storage device performs a test write/read (step 3) in a test track in the file system area to obtain conditions such as an optimum write power, read power, and reproduction magnetic field for accessing the file system area. It then reads (step 4) the file system area under the conditions and sends read data to the host. The host determines based on the sent data that free area is separated into a discontiguous first and second areas as described above and issues at time T2 a command for updating the file system area by adding file system information indicating an information file to be recorded in the first and second areas. The information storage device receives the command and updates (step 5) the file system area. Then, at time T3, the host indicates the address of the first area to the information storage device and sends write data to be recorded in the first area out of the data constituting the information file. The information storage device seeks (step 6) to a test track in a zone containing the first area and performs a test write/read (step 7) in the test track to obtain conditions such as optimum write power. It then seeks (step 8) to the first area and uses the conditions obtained by the test write/read (step 7) to write (step 9) the write data in the first area. Then, at time T4, the host indicates the address of the second area and sends write data to be recorded in the second area. The information storage device seeks (step 10) to a test track in a zone containing the second area and performs a test write/read (step 11) in the test track to obtain conditions such as optimum write power. It then seeks (step 12) to the second area and uses the conditions obtained in the test write/read (step 11) to write (step 13) the write data in the second area.
In this way, when an information file is written in discontiguous free areas, seek operations are required to move between the free areas. In addition, if the free areas are in different zones, a test write/read is required for each free area. As a result, seek and test write/read operations occur frequently, thereby degrading throughput for writing the information file.
FIG. 3 shows a time chart of an operation of reading a discontiguous information file.
First, at time T5, the host provides the address of a file system area to the information storage device and issues a command for reading data stored at the address. The information storage device performs a test write/read (step 14) in a test track in the file system area to obtain conditions such as an optimum write power, read power, and reproduction magnetic field for accessing the file system area. It then reads (step 15) the file system area under the conditions and sends read data to the host. The host determines based on the sent data that the information file is stored in discontiguous first and second areas as described above. Then, at time T6, the host indicates the address of the first area to the information storage device and instructs it to read data stored in the first area. The information storage device seeks (step 16) to a test track in a zone containing the first area and performs a test write/read (step 17) in the test track to obtain conditions such as optimum write power. It then seeks (step 18) to the first area and uses the conditions obtained in the test write/read (step 17) to read (step 19) data stored in the first area. Then, at time T7, the host indicates the address of the second area to the information storage device and instructs it to read data stored in the second area. The information storage device seeks (step 20) to a test track in a zone containing the second area and performs a test write/read (step 21) in the test track to obtain conditions such as optimum write power. It then seeks (step 22) to the second area and uses the conditions obtained by the test write/read (step 21) to read (step 23) data stored in the second area. In some types of MO disks, only test writes are performed without performing test reads. A test write/read may be omitted if the previous test write/read is effective.
In this way, similarly to a write operation, when an information file stored in discontiguous areas is read, seek operations are required to move between the free areas. In addition, if the free areas are contained in different zones, a test write/read is required for each zone. As a result, seek and test write/read operations occur frequently, thereby degrading throughput for reading the information file. The discontiguous information file produces additional discontiguous free areas and discontiguous files when it is deleted or overwritten, thereby further degrading the throughput.
According to the prior art, a host performs an operation called the defragmentation to rearrange components of information files in order to achieve the state that there is no discontiguous information files. While defragmenting, the host refers to a file system and outputs read or write instructions. Thus, defragmenting takes the host away from its other jobs. In addition, defragmentation by the host is instructed by a user when he or she finds that defragmentation is required. While contiguous files resulting from defragmentation may provide adequate throughput shortly after the defragmentation, accesses to the files increase the number of discontiguous information files over a short period of time, thereby degrading the throughput. Nevertheless, it is impractical that the user instructs the host to perform defragmentation at frequent intervals because it is laborious for the user and degrades the entire throughput of the host.